Code
makestars <- function(pvalues) {
return(
dplyr::case_when(
pvalues < 0.001 ~ "$***$",
pvalues < 0.05 ~ "$**$",
pvalues < 0.1 ~ "$*$",
.default = ""
)
)
}
gtgazer <- function(model, n_coef = 4, coefnames, description, title, bg_color) {
coefficients <- summary(model)$coefTable[1:n_coef, 1]
std_values <- summary(model)$coefTable[1:n_coef, 2]
pvalues <- summary(model)$coefTable[1:n_coef, 4]
signif <- makestars(pvalues)
r2 <- round(summary(model)$r2, 3)
adj_r2 <- round(summary(model)$r2bar, 3)
n <- summary(model)$nObs
dep_variable <- summary(model)$yName
coefnames <- coefnames
description <- description
reg_results <- data.frame(cbind(coefnames, description, coefficients, std_values, pvalues, signif)) |>
tibble() |>
mutate(across(c(coefficients, std_values, pvalues), as.numeric))
table <- reg_results |>
gt(rowname_col = "coefnames") |>
cols_label(
description = md("**Description**"),
coefficients = md("**Coefficients**"),
std_values = md("**Ecart Type**"),
pvalues = md("**Pvalues**"),
signif = md("**Significativité**")
) |>
fmt_markdown(columns = c(coefnames, signif, description)) |>
fmt_number(columns = c(coefficients, pvalues), decimals = 3) |>
fmt(columns = std_values, fns = function(std) {
paste("+/-", round(std, 3))
}) |>
tab_footnote(footnote = md(sprintf("*Observations* : %s", n))) |>
tab_footnote(footnote = md("***")) |>
tab_footnote(footnote = md(sprintf("$R^2=$ %s", r2))) |>
tab_footnote(footnote = md(sprintf("$R^2_{adj}=$ %s", adj_r2))) |>
tab_header(
title = md(title),
subtitle = md(sprintf("Variable dépendante : *%s*", dep_variable))
) |>
tab_options(
table.background.color = bg_color
)
return(table)
}1 Imports
Tout au long de ce projet, nous utiliserons l’approche tidy développée par Wickham (2014) plutôt que l’approche base R pour manipuler nos données.
Code
library(ggplot2)
library(dplyr)
library(readxl)
library(micEcon)
library(stargazer)
library(gt)
library(tibble)
library(knitr)
library(plotly)
library(patchwork)Code
bg_color <- "#FCFCFC"2 Description des données
Le jeu de données appleProdFr86 utilisé dans le papier d’économétrie de Ivaldi et al. (1996) comprend des données transversales de production de 140 producteurs de pommes français datant de l’année 1986.
Code
apples <- read_excel("data/appleProdFr86.xlsx")| Colonnes | Description |
|---|---|
vCap |
Coûts associés au capital (foncier compris). |
vLab |
Coûts associés au travail (y compris la rémunération du travail familial non rémunéré). |
vMat |
Coûts des matières intermédiaires (plantations, engrais, pesticides, carburant, etc). |
qApples |
Indice de quantité des pommes produites. |
qOtherOut |
Indice de quantité de tous les autres outputs. |
qOut |
Indice de quantité de toute la production \(\Rightarrow 580000 \cdot (\text{qApples} + \text{qOtherOut})\) |
pCap |
Indice des prix du capital. |
pLab |
Indice des prix du travail. |
pMat |
Indice des prix des matières intermédiaires. |
pOut |
Indice des prix de la production globale. |
adv |
Distingue les producteurs qui sont conseillés par des laboratoires d’agronomie. |
2.1 Tableau descriptif
Ce tableau descriptif retrace les 10 premières observations et l’ensemble des variables associées dans le dataset.
Code
apples |>
head(n = 10) |>
gt() |>
tab_header(
title = md("**Producteurs de pommes 🍎**"),
subtitle = md("*140 producteurs* 🇫🇷 *(1986)*")
) |>
tab_source_note(
source_note = "Source: Ivaldi et al. (1996)"
) |>
tab_spanner(
label = "Costs",
columns = c("vCap", "vLab", "vMat")
) |>
tab_spanner(
label = "Price Index",
columns = c("pCap", "pLab", "pMat", "pOut")
) |>
tab_spanner(
label = "Quantity Index",
columns = c("qApples", "qOtherOut", "qOut")
) |>
tab_style(
style = list(
cell_fill(color = "lavenderblush")
),
location = cells_body(columns = c(vCap, vLab, vMat))
) |>
tab_style(
style = list(
cell_fill(color = "ivory")
),
location = cells_body(columns = c(qApples, qOtherOut, qOut))
) |>
tab_style(
style = list(
cell_fill(color = "aliceblue")
),
location = cells_body(columns = c(pCap, pLab, pMat, pOut))
) |>
fmt_number(suffixing = TRUE, n_sigfi = 2) |>
text_case_match(
"1.0" ~ fontawesome::fa("check"),
"0" ~ fontawesome::fa("xmark"),
.locations = cells_body(columns = adv)
) |>
tab_options(
table.background.color = bg_color
)| Producteurs de pommes 🍎 | ||||||||||||||
| 140 producteurs 🇫🇷 (1986) | ||||||||||||||
| N | Costs | Quantity Index | Price Index | adv | qCap | qLab | qMat | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| vCap | vLab | vMat | qApples | qOtherOut | qOut | pCap | pLab | pMat | pOut | |||||
| 1 | 220K | 320K | 300K | 1.4 | 0.98 | 1.4M | 2.6 | 0.90 | 8.9 | 0.66 | 84K | 360K | 34K | |
| 2 | 130K | 190K | 260K | 0.86 | 1.1 | 1.1M | 3.3 | 0.75 | 6.4 | 0.72 | 40K | 250K | 41K | |
| 3 | 81K | 130K | 91K | 3.3 | 0.40 | 2.2M | 2.2 | 0.96 | 3.7 | 0.94 | 37K | 140K | 24K | |
| 4 | 34K | 110K | 60K | 0.44 | 0.44 | 510K | 1.6 | 1.3 | 3.2 | 0.60 | 21K | 83K | 19K | |
| 5 | 39K | 84K | 100K | 1.8 | 0.015 | 1.1M | 0.87 | 0.94 | 7.2 | 0.83 | 45K | 89K | 14K | |
| 6 | 120K | 520K | 580K | 8.5 | 0.43 | 5.2M | 1.0 | 0.96 | 9.6 | 1.4 | 120K | 550K | 60K | |
| 7 | 89K | 170K | 340K | 4.1 | 3.3 | 4.3M | 0.98 | 1.0 | 7.8 | 1.3 | 91K | 170K | 44K | |
| 8 | 92K | 200K | 130K | 2.2 | 1.1 | 1.9M | 1.0 | 0.92 | 5.0 | 0.62 | 89K | 220K | 25K | |
| 9 | 66K | 180K | 190K | 1.8 | 2.6 | 2.5M | 2.5 | 1.0 | 5.6 | 1.9 | 27K | 180K | 34K | |
| 10 | 94K | 140K | 82K | 1.6 | 0.45 | 1.2M | 0.98 | 0.64 | 5.6 | 0.49 | 95K | 220K | 15K | |
| Source: Ivaldi et al. (1996) | ||||||||||||||
3 Statistiques descriptives
3.1 Productivités moyenne des facteurs de production
La productivité moyenne (\(AP =\) Average Product) consiste à diviser la quantité totale d’output par la quantité totale de facteur utilisé (input) dans le processus de production.
Nous obtenons alors respectivement :
\(AP_{Cap} = \frac{q_{Out}}{q_{Cap}}\)
\(AP_{Lab} = \frac{q_{Out}}{q_{Lab}}\)
\(AP_{Mat} = \frac{q_{Out}}{q_{Mat}}\)
Code
apples <- apples |> mutate(
AP_Cap = qOut / qCap,
AP_Lab = qOut / qLab,
AP_Mat = qOut / qMat
)
apples |> summarise(mean_AP_Cap = mean(AP_Cap))# A tibble: 1 × 1
mean_AP_Cap
<dbl>
1 32.6
Code
apples |> summarise(mean_AP_Lab = mean(AP_Lab))# A tibble: 1 × 1
mean_AP_Lab
<dbl>
1 10.2
Code
apples |> summarise(mean_AP_Mat = mean(AP_Mat))# A tibble: 1 × 1
mean_AP_Mat
<dbl>
1 90.6
Ajouter aussi le min/max en plus de la moyenne
- La productivité moyenne du travail mesure la productivité de la main d’œuvre de la firme en termes de combien chaque travailleur produit en moyenne par mois.
EXPLIQUER POUR CHAQUE input \(\Rightarrow\) imaginons que les unités sont des tonnes (combien de tonnes sont produites par unité de travail, capital, etc.)
Code
apples |>
ggplot() +
aes(x = AP_Cap) +
geom_histogram(binwidth = 1.25, fill = "royalblue", alpha = 0.7) +
labs(title = "Productivité Moyenne du Capital", x = "Productivité", y = "Fréquence")Code
apples |>
ggplot() +
aes(x = AP_Lab) +
geom_histogram(binwidth = 0.75, fill = "darkgreen", alpha = 0.7) +
labs(title = "Productivité Moyenne du Travail", x = "Productivité", y = "Fréquence")Code
apples |>
ggplot() +
aes(x = AP_Mat) +
geom_histogram(binwidth = 1.25, fill = "darkorchid", alpha = 0.7) +
labs(title = "Productivité Moyenne des matériaux", x = "Productivité", y = "Fréquence")3.2 Corrélations entre les quantités des 3 facteurs de production
Code
apples |>
select(starts_with("AP")) |>
cor() |>
round(2) |>
data.frame() |>
gt() |>
tab_header("Matrice de corrélation")| Matrice de corrélation | ||
| AP_Cap | AP_Lab | AP_Mat |
|---|---|---|
| 1.00 | 0.51 | 0.46 |
| 0.51 | 1.00 | 0.73 |
| 0.46 | 0.73 | 1.00 |
3.3 Productivités moyennes
\(\Rightarrow\) Idée : Faire des régressions linéaires sur ces graphs. étudier la relation.
Code
CL <- apples |>
ggplot() +
aes(x = AP_Cap, y = AP_Lab) +
geom_point()
ML <- apples |>
ggplot() +
aes(x = AP_Mat, y = AP_Lab) +
geom_point()
CM <- apples |>
ggplot() +
aes(x = AP_Cap, y = AP_Mat) +
geom_point()
CL + ML + CMCode
QC <- apples |>
ggplot() +
aes(y = qOut, x = AP_Cap) +
geom_point()
QL <- apples |>
ggplot() +
aes(y = qOut, x = AP_Lab) +
geom_point()
QM <- apples |>
ggplot() +
aes(y = qOut, x = AP_Mat) +
geom_point()
QC + QL + QM3.4 Paasche ou Laspeyeres ou Fisher
3.5 Indice de productivité globale des facteurs
Code
apples$prod_global <- (apples$qOut) / (apples$vCap + apples$vLab + apples$vMat)Code
apples |>
ggplot() +
aes(x = prod_global) +
geom_histogram(binwidth = 0.25, fill = "darkred", alpha = 0.7) +
labs(title = "Productivité global", x = "Productivité", y = "Fréquence")Code
apples |>
ggplot() +
aes(x = prod_global, fill = as.factor(adv)) +
geom_boxplot() +
coord_flip() +
labs(title = "Productivité global en fonction conseil ou non") +
theme(legend.position = "None")4 Analyse exploratoire
ACP à faire ? pourrait être intéressant
Code
apples_num <- apples |>
select(-N)
cor <- apples_num |> cor()
fig <- plot_ly(x = apples$vCap, type = "histogram", nbinsx = 30, alpha = 0.6)
figCode
fig <- plot_ly(alpha = 0.6, nbinsx = 50)
fig <- fig %>% add_histogram(apples$vCap[apples$adv == 1], name = "advisory service")
fig <- fig %>% add_histogram(apples$vCap[apples$adv == 0], name = "not advisory service")
fig <- fig %>% layout(
barmode = "overlay",
yaxis = list(title = "Frequency"),
xaxis = list(title = "Values")
)
fig4.1 Infos sur le sujet
\[ Q = f(QCAP, QLAB, QMAT)\\ \]
il y a aussi les infos sur \(C(Q)\)
Comparer les productivités des facteurs. (graphiquement) - imaginons que les unités sont des tonnes (combien de tonnes sont produites par unité de travail, capital, etc.)
Comment ces productivités individuelles sont corrélées (entre QCAP, QLAB, QMAT)
- Indice de Paasche
- Indice de Laspeyres
- Indice de Fisher
Expliquer les différences de profits entre les producteurs ? Regarder du coté des fonctions de profit.
Propriété de la CD => si la fonction de prod est cobb douglas, alors la fonction de coût l’est aussi.
alpha y => mesure des rendements d’échelle…
Pour la question 7, o nintègre la quantité d’inputs comme variable explicative => fonction de cout de court terme
Fonction de cout qui intègre que la quantité de capital ne change pas instantanément
Rendements d’échelle (somme des exposants) => on peut trouver ces rendements d’échelle soit en faisant la fonction de coût, ou la fonction de production. Mais on peut aussi les estimer grace à une fonction de demande
DEUX CHOSES ESSENTIELLES
- Il faut estimer les substitutions entre facteurs
- Les rendements d’échelle
Dans la cobb douglas les substitutions entre facteurs il est constant et c’est 1.
Regarder le \(\prod\)
4.2 Notes sur la translog Cost
On pourrait tt à fait estimer le système d’équations suivant :
Voir aussi la slide 78 sur la fonction \(\ln C\)
\[ \begin{cases} S_1 = \alpha_1 + \sum^3_{i=1} \beta_{1j}\ln p_j + \beta_{1y}\ln y\\ S_2 = \alpha_2 + \sum^3_{i=1} \beta_{2j}\ln p_j + \beta_{2y}\ln y\\ S_3 = \alpha_3 + \sum^3_{i=1} \beta_{3j}\ln p_j + \beta_{3y}\ln y \end{cases} \]
Inconvénients dans la translog et des formes flexibles :
Le nombre de paramètres explose à cause des effets croisés et risque important de collinéarité.
Quand on passe au système au tableau, on a augmenté à 3*140 données (420 observations) et on a un peu moins de paramètres
Code
apples |>
select(qApples, adv) |>
group_by(adv) |>
summarise(mean = mean(qApples))# A tibble: 2 × 2
adv mean
<dbl> <dbl>
1 0 3.15
2 1 2.99
5 Fonction Cobb-Douglas
La forme est généralisée à \(N\) inputs.
\[y = A \prod_{k=1}^N x_k^{a_k}\]
Dans le cadre de cette étude comparative, nous avons 3 inputs :
qCap\(\Rightarrow\) la quantité de capitalqLab\(\Rightarrow\) la quantité de travailqMat\(\Rightarrow\) la quantité de matériaux
Nous obtenons donc la forme suivante :
\[q_{Out} = A\cdot q_{Cap}^\alpha \cdot q_{Lab}^\beta \cdot q_{Mat}^\gamma\]
Avec \(A, \alpha, \beta, \gamma \Rightarrow\) 4 paramètres à estimer.
On peut facilement linéariser la fonction, dès lors on obtient :
\[ \ln(q_{out}) = \ln(A) + \alpha \cdot \ln(q_{Cap}) + \beta \cdot \ln(q_{Lab}) + \gamma \cdot \ln(q_{Mat}) \]
Allen Elasticity of Substitution (AES)
\(\sigma_{\{\text{qCap, qLab, qMat}\}} = 1\)
Rappel : Si la fonction de production est Cobb-Douglas, alors on a normalement \(\hat\alpha + \hat\beta + \hat\gamma = 1\)
On peut tester cette hypothèse :
\[ \begin{cases} H_0 : \alpha + \beta + \gamma = 1\\ H_1 : \alpha + \beta + \gamma \neq 1\\ \end{cases} \]
Code
# Estime une fonction de production Cobb Douglas avec l'argument linear
cd_prod <- translogEst(
"qOut",
c("qCap", "qLab", "qMat"),
apples,
linear = TRUE
)
quad_prod <- quadFuncEst(
"qOut",
c("qCap", "qLab", "qMat"),
apples
)
summary(quad_prod$est)
Call:
lm(formula = as.formula(estFormula), data = estData)
Residuals:
Min 1Q Median 3Q Max
-3928802 -695518 -186123 545509 4474143
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -2.911e+05 3.615e+05 -0.805 0.422072
a_1 5.270e+00 4.403e+00 1.197 0.233532
a_2 6.077e+00 3.185e+00 1.908 0.058581 .
a_3 1.430e+01 2.406e+01 0.595 0.553168
b_1_1 5.032e-05 3.699e-05 1.360 0.176039
b_1_2 -3.097e-05 1.498e-05 -2.067 0.040763 *
b_1_3 -4.160e-05 1.474e-04 -0.282 0.778206
b_2_2 -3.084e-05 2.081e-05 -1.482 0.140671
b_2_3 4.011e-04 1.112e-04 3.608 0.000439 ***
b_3_3 -1.896e-03 8.951e-04 -2.118 0.036106 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1344000 on 130 degrees of freedom
Multiple R-squared: 0.8449, Adjusted R-squared: 0.8342
F-statistic: 78.68 on 9 and 130 DF, p-value: < 2.2e-16
Code
elasticities(cd_prod) qCap qLab qMat
1 0.1630268 0.6762184 0.6271972
2 0.1630268 0.6762184 0.6271972
3 0.1630268 0.6762184 0.6271972
4 0.1630268 0.6762184 0.6271972
5 0.1630268 0.6762184 0.6271972
6 0.1630268 0.6762184 0.6271972
7 0.1630268 0.6762184 0.6271972
8 0.1630268 0.6762184 0.6271972
9 0.1630268 0.6762184 0.6271972
10 0.1630268 0.6762184 0.6271972
11 0.1630268 0.6762184 0.6271972
12 0.1630268 0.6762184 0.6271972
13 0.1630268 0.6762184 0.6271972
14 0.1630268 0.6762184 0.6271972
15 0.1630268 0.6762184 0.6271972
16 0.1630268 0.6762184 0.6271972
17 0.1630268 0.6762184 0.6271972
18 0.1630268 0.6762184 0.6271972
19 0.1630268 0.6762184 0.6271972
20 0.1630268 0.6762184 0.6271972
21 0.1630268 0.6762184 0.6271972
22 0.1630268 0.6762184 0.6271972
23 0.1630268 0.6762184 0.6271972
24 0.1630268 0.6762184 0.6271972
25 0.1630268 0.6762184 0.6271972
26 0.1630268 0.6762184 0.6271972
27 0.1630268 0.6762184 0.6271972
28 0.1630268 0.6762184 0.6271972
29 0.1630268 0.6762184 0.6271972
30 0.1630268 0.6762184 0.6271972
31 0.1630268 0.6762184 0.6271972
32 0.1630268 0.6762184 0.6271972
33 0.1630268 0.6762184 0.6271972
34 0.1630268 0.6762184 0.6271972
35 0.1630268 0.6762184 0.6271972
36 0.1630268 0.6762184 0.6271972
37 0.1630268 0.6762184 0.6271972
38 0.1630268 0.6762184 0.6271972
39 0.1630268 0.6762184 0.6271972
40 0.1630268 0.6762184 0.6271972
41 0.1630268 0.6762184 0.6271972
42 0.1630268 0.6762184 0.6271972
43 0.1630268 0.6762184 0.6271972
44 0.1630268 0.6762184 0.6271972
45 0.1630268 0.6762184 0.6271972
46 0.1630268 0.6762184 0.6271972
47 0.1630268 0.6762184 0.6271972
48 0.1630268 0.6762184 0.6271972
49 0.1630268 0.6762184 0.6271972
50 0.1630268 0.6762184 0.6271972
51 0.1630268 0.6762184 0.6271972
52 0.1630268 0.6762184 0.6271972
53 0.1630268 0.6762184 0.6271972
54 0.1630268 0.6762184 0.6271972
55 0.1630268 0.6762184 0.6271972
56 0.1630268 0.6762184 0.6271972
57 0.1630268 0.6762184 0.6271972
58 0.1630268 0.6762184 0.6271972
59 0.1630268 0.6762184 0.6271972
60 0.1630268 0.6762184 0.6271972
61 0.1630268 0.6762184 0.6271972
62 0.1630268 0.6762184 0.6271972
63 0.1630268 0.6762184 0.6271972
64 0.1630268 0.6762184 0.6271972
65 0.1630268 0.6762184 0.6271972
66 0.1630268 0.6762184 0.6271972
67 0.1630268 0.6762184 0.6271972
68 0.1630268 0.6762184 0.6271972
69 0.1630268 0.6762184 0.6271972
70 0.1630268 0.6762184 0.6271972
71 0.1630268 0.6762184 0.6271972
72 0.1630268 0.6762184 0.6271972
73 0.1630268 0.6762184 0.6271972
74 0.1630268 0.6762184 0.6271972
75 0.1630268 0.6762184 0.6271972
76 0.1630268 0.6762184 0.6271972
77 0.1630268 0.6762184 0.6271972
78 0.1630268 0.6762184 0.6271972
79 0.1630268 0.6762184 0.6271972
80 0.1630268 0.6762184 0.6271972
81 0.1630268 0.6762184 0.6271972
82 0.1630268 0.6762184 0.6271972
83 0.1630268 0.6762184 0.6271972
84 0.1630268 0.6762184 0.6271972
85 0.1630268 0.6762184 0.6271972
86 0.1630268 0.6762184 0.6271972
87 0.1630268 0.6762184 0.6271972
88 0.1630268 0.6762184 0.6271972
89 0.1630268 0.6762184 0.6271972
90 0.1630268 0.6762184 0.6271972
91 0.1630268 0.6762184 0.6271972
92 0.1630268 0.6762184 0.6271972
93 0.1630268 0.6762184 0.6271972
94 0.1630268 0.6762184 0.6271972
95 0.1630268 0.6762184 0.6271972
96 0.1630268 0.6762184 0.6271972
97 0.1630268 0.6762184 0.6271972
98 0.1630268 0.6762184 0.6271972
99 0.1630268 0.6762184 0.6271972
100 0.1630268 0.6762184 0.6271972
101 0.1630268 0.6762184 0.6271972
102 0.1630268 0.6762184 0.6271972
103 0.1630268 0.6762184 0.6271972
104 0.1630268 0.6762184 0.6271972
105 0.1630268 0.6762184 0.6271972
106 0.1630268 0.6762184 0.6271972
107 0.1630268 0.6762184 0.6271972
108 0.1630268 0.6762184 0.6271972
109 0.1630268 0.6762184 0.6271972
110 0.1630268 0.6762184 0.6271972
111 0.1630268 0.6762184 0.6271972
112 0.1630268 0.6762184 0.6271972
113 0.1630268 0.6762184 0.6271972
114 0.1630268 0.6762184 0.6271972
115 0.1630268 0.6762184 0.6271972
116 0.1630268 0.6762184 0.6271972
117 0.1630268 0.6762184 0.6271972
118 0.1630268 0.6762184 0.6271972
119 0.1630268 0.6762184 0.6271972
120 0.1630268 0.6762184 0.6271972
121 0.1630268 0.6762184 0.6271972
122 0.1630268 0.6762184 0.6271972
123 0.1630268 0.6762184 0.6271972
124 0.1630268 0.6762184 0.6271972
125 0.1630268 0.6762184 0.6271972
126 0.1630268 0.6762184 0.6271972
127 0.1630268 0.6762184 0.6271972
128 0.1630268 0.6762184 0.6271972
129 0.1630268 0.6762184 0.6271972
130 0.1630268 0.6762184 0.6271972
131 0.1630268 0.6762184 0.6271972
132 0.1630268 0.6762184 0.6271972
133 0.1630268 0.6762184 0.6271972
134 0.1630268 0.6762184 0.6271972
135 0.1630268 0.6762184 0.6271972
136 0.1630268 0.6762184 0.6271972
137 0.1630268 0.6762184 0.6271972
138 0.1630268 0.6762184 0.6271972
139 0.1630268 0.6762184 0.6271972
140 0.1630268 0.6762184 0.6271972
Code
elasticities(quad_prod) qCap qLab qMat
1 -0.0683746874 0.57687640 0.81906669
2 -0.0265757277 1.04427755 0.44778623
3 0.0457779129 1.00325469 0.38823627
4 0.0869621958 1.20065927 0.28885789
5 0.2352427347 0.87375413 0.38194791
6 -0.1264727813 0.68133847 0.89666841
7 0.1221931383 1.26757751 -0.12911816
8 0.0682507699 0.64266834 0.58324829
9 -0.0037272578 1.13754895 0.32832041
10 0.1516249446 0.29334268 0.64543065
11 0.1345077165 1.41826356 -0.23173382
12 0.0754354913 0.80813468 0.44585129
13 0.0268099948 0.70873513 0.60584443
14 0.0505240831 0.81999137 0.48198102
15 0.3886607511 1.77683318 -1.26665342
16 -0.0621893540 0.51354235 0.83788848
17 0.1042730415 1.16439150 0.32372021
18 0.2717485273 -0.03839408 0.86767696
19 0.8707350893 0.33288934 0.18425006
20 0.0030276060 0.41280526 0.74572775
21 0.5515444167 -0.09483192 0.65607229
22 -0.0527139288 0.61199447 0.76933053
23 -0.0710821221 0.25980070 0.91484158
24 0.2537174762 0.33682297 0.58036616
25 0.0636787065 0.97384327 0.33565648
26 -0.0181445688 1.04488654 0.45245922
27 0.0557877773 0.91451989 0.44332354
28 0.0157845748 0.63654981 0.65312544
29 0.0776358172 0.86792473 0.49677721
30 0.0578086249 0.75658396 0.54317248
31 0.1169563092 0.73782109 0.47192417
32 -0.0064106845 0.84841495 0.61102059
33 0.0033070917 0.70069499 0.63939027
34 -0.0038332749 0.53148483 0.72419512
35 0.0740260083 0.34723298 0.73651826
36 0.1503341077 0.98404247 0.26783594
37 0.0681144965 0.68569959 0.56021151
38 0.0764364117 0.85940927 0.50300658
39 0.0242910657 0.88410813 0.57089660
40 0.5613217508 0.22474974 0.39044256
41 0.0082805590 0.77386597 0.59276195
42 0.0882552852 0.36592429 0.68327618
43 0.1825413665 0.57886773 0.51397830
44 0.1626043316 0.70700883 0.48884706
45 0.5066185440 0.44097680 0.35139470
46 0.3577802295 1.05562470 -0.19387602
47 0.2292228111 0.49495461 0.50128218
48 0.0934495766 0.91314882 0.36856427
49 0.6355233661 0.29501890 0.32624127
50 0.1326533689 0.39498761 0.55884137
51 0.2822489605 0.49709088 0.46017952
52 0.3522826935 0.64754653 0.38220639
53 0.1049591914 0.58506122 0.53512789
54 0.1836094731 0.93608600 0.45036452
55 0.0610450938 0.63491269 0.59705636
56 0.1854620616 0.35430773 0.58773032
57 0.1013851070 0.74846975 0.49118272
58 0.2141271636 0.53542105 0.48538507
59 0.2972502829 0.65405875 0.43654152
60 0.2121922636 -0.09205309 0.84815957
61 -0.0041304689 0.46350237 0.58739542
62 0.0892998204 0.84172270 0.47173009
63 0.6489568467 0.26310343 0.35399374
64 0.1327207829 0.40807628 0.58520289
65 0.0594514390 0.56340164 0.62869180
66 -0.0766249853 0.72699384 0.73627054
67 0.0689601294 0.39379773 0.77570617
68 0.2161234727 0.89695343 0.17200192
69 -0.1554456137 0.38527392 1.11998276
70 0.9433122327 0.40992237 0.02219290
71 0.1657646916 0.66766512 0.49776447
72 0.4027631104 0.50721298 0.39284315
73 0.0553784757 0.69588681 0.58086386
74 0.0112401332 0.88419821 0.57335919
75 0.2090253743 0.55824596 0.50218408
76 0.0320256955 0.70398955 0.58657830
77 0.1150667886 0.68708314 0.52037342
78 0.3820153875 0.52383823 0.39087643
79 0.0564304371 0.90903184 0.52182593
80 0.0811108738 1.09363455 0.54267601
81 0.4406409859 0.74339599 0.24585438
82 -0.0828202002 2.07439898 -0.66852217
83 0.6794272610 0.19114047 0.33905544
84 0.6067851333 0.57397294 0.13165300
85 0.2174750427 0.82091282 0.24783582
86 0.2130095765 0.47890331 0.57649529
87 0.1686778574 0.62289026 0.49059061
88 0.1143495104 0.62434026 0.55098285
89 0.0134845997 1.21980085 0.19438839
90 -0.1932694490 -0.05581184 1.44519804
91 0.3673576483 0.79937471 0.09867882
92 0.3148581466 0.58829180 0.36943555
93 -0.0529213122 0.81403035 0.64303117
94 -0.2115523152 0.17396758 1.30876375
95 0.0176264426 1.10125507 0.37307583
96 -0.3446709569 0.33191059 1.51137730
97 0.0279107653 0.62872967 0.63493954
98 0.2942846868 0.74262385 0.25022562
99 0.5133529429 1.35503896 -0.80756811
100 0.0273740784 1.27935340 0.14731312
101 -0.0669267318 0.87439845 0.67843356
102 0.1511574681 0.54518913 0.58792255
103 -0.0080988933 0.84779103 0.59426152
104 -0.0129150057 0.94515261 0.52254802
105 -0.0338806105 0.58281101 0.74904214
106 0.0716014264 0.66727518 0.57007660
107 0.0560146041 2.35632933 -1.43131511
108 0.0818184497 0.69169633 0.54818656
109 0.4852664295 1.08331780 -0.36391019
110 -0.0953679601 0.42338117 0.94085234
111 0.2325256201 0.56560231 0.46722435
112 0.0288949736 1.23363839 0.08629216
113 0.0162073482 0.76740656 0.58066360
114 0.2449403670 0.87830822 0.18247779
115 0.4448789564 0.45197823 0.38271563
116 0.0009346464 0.76617171 0.62106654
117 0.0737413576 -0.31567661 0.90940751
118 0.0340885447 0.35181188 0.71205730
119 0.1266343257 0.49315175 0.59386595
120 0.9030338107 0.04443464 0.32251176
121 -0.0052464463 0.85328262 0.60896868
122 0.1149522887 0.53889548 0.58655143
123 0.0594433477 0.76712614 0.53637922
124 0.1828670170 0.81356350 0.29879041
125 -0.1139184926 0.16593257 1.10946810
126 0.0104466184 1.03220036 0.57360688
127 0.1609657723 0.67976991 0.50277999
128 0.0370291111 0.66958049 0.60537232
129 -0.2071252376 0.72900322 1.09214111
130 0.3066108640 0.43932908 0.48221785
131 0.5744652027 0.24477632 0.40342012
132 -0.1062395443 0.66204951 0.92560837
133 0.0750813954 0.60767975 0.59086510
134 -0.1953985233 0.33188615 1.24184800
135 0.4092092517 0.39421185 0.39754519
136 0.0508209754 0.74132710 0.55602305
137 0.4074753440 0.31789498 0.56637397
138 0.0381503220 0.42203407 0.71902756
139 0.0313999042 0.91300414 0.56249517
140 0.0672719328 1.15188156 0.10678081
Code
gtgazer(
cd_prod,
n_coef = 4,
coefnames = c("$A$", "$\\alpha$", "$\\beta$", "$\\gamma$"),
description = c(
"- Constante du modèle",
"- Coefficient associé à la variable `qCap`",
"- Coefficient associé à la variable `qLab`",
"- Coefficient associé à la variable `qMat`"
),
title = "**Fonction de production Cobb-Douglas**",
bg_color = bg_color
)| Fonction de production Cobb-Douglas | |||||
| Variable dépendante : qOut | |||||
| Description | Coefficients | Ecart Type | Pvalues | Significativité | |
|---|---|---|---|---|---|
\(A\) |
|
−2.064 | +/- 1.313 | 0.118 | |
\(\alpha\) |
|
0.163 | +/- 0.087 | 0.064 | \(*\) |
\(\beta\) |
|
0.676 | +/- 0.154 | 0.000 | \(***\) |
\(\gamma\) |
|
0.627 | +/- 0.126 | 0.000 | \(***\) |
| Observations : 140 | |||||
| |
|||||
| \(R^2=\) 0.594 | |||||
| \(R^2_{adj}=\) 0.585 | |||||
Code
summary(cd_prod$est)
Call:
lm(formula = as.formula(estFormula), data = estData)
Residuals:
Min 1Q Median 3Q Max
-1.67239 -0.28024 0.00667 0.47834 1.30115
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -2.06377 1.31259 -1.572 0.1182
a_1 0.16303 0.08721 1.869 0.0637 .
a_2 0.67622 0.15430 4.383 2.33e-05 ***
a_3 0.62720 0.12587 4.983 1.87e-06 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.656 on 136 degrees of freedom
Multiple R-squared: 0.5943, Adjusted R-squared: 0.5854
F-statistic: 66.41 on 3 and 136 DF, p-value: < 2.2e-16
Code
apples <- apples |> mutate(cost = vCap + vLab + vMat)Code
# Estime une fonction Cobb Douglas avec l'argument linear
# translogCostEst("cost", "qOut", c("qCap", "qLab", "qMat"), apples)- Avec la fonction de cout on trouve 2.7 – à vérifier
Estimer des fonctions de cout, les rendements d’échelle, estimer la fonction CES, la leontieff généralisée, calculer le profit des producteurs, lien entre efficacité, optimalité, vérifier hétéroscédasticité.
Code
cobbDouglasCalc(c("qCap", "qLab", "qMat"), apples, coef(cd_prod)[1:4], coefCov = NULL, dataLogged = FALSE) 1 2 3 4 5 6 7
3211442.9 2484348.9 1198934.2 659255.2 657608.3 6440150.6 2289560.6
8 9 10 11 12 13 14
1941829.7 1643085.0 1393628.8 1065518.4 2532062.5 1142644.8 1990393.7
15 16 17 18 19 20 21
1804586.9 2486696.5 623801.8 4674844.6 652055.8 1602756.5 3585652.8
22 23 24 25 26 27 28
3105133.1 1962299.4 1894850.1 1730990.1 2028057.2 1236923.3 3120162.0
29 30 31 32 33 34 35
857551.9 1283936.8 1591240.6 1112374.7 1104836.2 1990082.5 2286930.2
36 37 38 39 40 41 42
1050671.7 670978.8 385308.3 617220.9 947210.5 1523069.4 1590208.7
43 44 45 46 47 48 49
1152166.4 874268.3 856786.7 1501912.2 812992.3 1433944.5 1169689.9
50 51 52 53 54 55 56
761120.5 655665.9 737223.4 623412.9 541717.9 1239529.1 1182383.1
57 58 59 60 61 62 63
1401808.7 628116.7 507950.3 2747396.1 539581.5 1055087.5 3550349.5
64 65 66 67 68 69 70
935872.0 1410581.5 5799225.5 4578344.7 2308627.1 5785802.2 8756920.8
71 72 73 74 75 76 77
936486.7 859620.4 940655.3 461623.9 848543.7 2309804.2 1241075.8
78 79 80 81 82 83 84
456956.7 723527.6 395900.6 692132.4 6173798.8 936641.2 6561521.0
85 86 87 88 89 90 91
3007107.9 4707504.1 1821147.0 1274546.0 1539352.9 10076301.8 1887415.3
92 93 94 95 96 97 98
1941222.6 3696158.0 6802400.4 1055932.4 23101792.2 1334995.9 1869797.5
99 100 101 102 103 104 105
3712233.4 1116260.1 4223297.1 4854943.6 1385925.9 1748553.8 2053107.4
106 107 108 109 110 111 112
1458847.1 2051602.9 643613.7 5267349.8 3902378.1 1836245.8 2455677.3
113 114 115 116 117 118 119
1624723.3 1560690.4 953841.4 710120.9 1658775.2 1321024.4 1312615.0
120 121 122 123 124 125 126
2743290.7 1054216.7 1320798.9 1262051.7 2844557.5 2947324.2 407556.6
127 128 129 130 131 132 133
825951.6 1757610.8 17344690.0 1679538.3 2161094.8 5913745.0 1058384.3
134 135 136 137 138 139 140
7738514.2 561868.8 1386779.3 7276857.5 1834723.0 556354.7 2416013.3